package homework;
import java.util.Scanner;
public class Domo10 {
    public static void main(String[] args) {
    Scanner LX = new Scanner(System.in);
    System.out.println("请输入菱形的边长");
    int BC = LX.nextInt();
    for (int i = 1; i <= BC; i++) {
        for (int j = 1; j <= BC - i; j++) {
            System.out.print(" ");
        }
        for (int k = 1; k <= 2 * i - 1; k++) {
            if (i == 1) {
                System.out.print("*");
            } else if(k==1||k==2*i-1){
                System.out.print("*");
            }else {
                System.out.print(" ");
            }
        }
        System.out.println();
    }
    for (int i = 1; i < BC; i++) {
        for (int j = 1; j <= i; j++) {
            System.out.print(" ");
        }
        for (int k = 1; k <= 2 * (BC - i) - 1; k++) {
            if (k == 1 || k == 2 * (BC - i) - 1) {
                System.out.print("*");
            } else {
                System.out.print(" ");
            }
        }
        System.out.println();
    }
}

}
